package designPattern.singleton;

/**
 * Author: hu
 * Date: 2021/11/26 10:04
 * 登记式静态内部类
 */
public class Singleton3 {
    private static class SingletonH{
        private static final Singleton3 instance = new Singleton3();
    }
    private Singleton3(){

    }
    public static final Singleton3 getInstance(){
        return SingletonH.instance;
    }

}
